##################################################################
# File : /lua/multiplayer/onlineprovider.lua
# Description : 3rd party integration options.  This will receive and send commands
#				by hooking into stdin/out in the supremecommander app.
# Author : GPG
##################################################################

# Called from C++ code when we are launching from Impulse.
function CreateLobby(autolaunch, protocol, port, playerName, uid, natTraversalProvider)

    local lobbyfile
    if autolaunch then
        lobbyfile = '/lua/ui/lobby/autolobby.lua'
    else
        lobbyfile = '/lua/ui/lobby/lobby.lua'
    end

    lobby = import(lobbyfile)
    if not lobby then
        error("Could not load " .. repr(lobbyfile))
    end

    lobby.Lobby(protocol, port, playerName, uid, nil, natTraversalProvider, nil, GetFrame(0), ExitApplication)
# 	lobby.CreateLobby(protocol, port, playerName, uid, natTraversalProvider, GetFrame(0), ExitApplication)
    return lobby
end
